Add a shortcut if the window and the current clip_region doesn't overlap.
authorAlexander Larsson <alla@lysator.liu.se>
Tue, 13 Feb 2001 16:22:11 +0000 (16:22 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Tue, 13 Feb 2001 16:22:11 +0000 (16:22 +0000)
2001-02-13  Alexander Larsson  <alla@lysator.liu.se>

* gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
Add a shortcut if the window and the current clip_region doesn't
overlap. This is needed when there are a lot of windows in a
window. The layout test in testgtk is a good test.

* gdk/linux-fb/gdkwindow-fb.c:
Whitespace fix.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/linux-fb/gdkdrawable-fb2.c
gdk/linux-fb/gdkwindow-fb.c

index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index ea0de33156c8a0aa7513e1ac6eaa2b74687ca294..b431cdf6df0fc4bda562794c164402fa3c6332d7 100644 (file)
@@ -1,3 +1,13 @@
+2001-02-13  Alexander Larsson  <alla@lysator.liu.se>
+
+       * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_clip_region):
+       Add a shortcut if the window and the current clip_region doesn't
+       overlap. This is needed when there are a lot of windows in a
+       window. The layout test in testgtk is a good test.
+
+       * gdk/linux-fb/gdkwindow-fb.c:
+       Whitespace fix.
+
 2001-02-13  Sven Neumann  <sven@convergence.de>
 
        * demos/testanimation.c: replaced deprecated gtk_drawing_area_size
index a19eac803e551df38d8e461c9f2379df8135c855..54bc099d382ffb81b241eb227c706efedcd62280 100644 (file)
@@ -2,6 +2,7 @@
 #include "gdkprivate-fb.h"
 #include "mi.h"
 #include <string.h>
+#include <gdkregion-generic.h>
 
 #include <pango/pangoft2.h>
 #include <freetype/ftglyph.h>
@@ -398,6 +399,14 @@ gdk_fb_clip_region (GdkDrawable *drawable,
                continue;
 
              impl_private = GDK_DRAWABLE_IMPL_FBDATA(cur->data);
+
+             /* This shortcut is really necessary for performance when there are a lot of windows */
+             if (impl_private->llim_x >= real_clip_region->extents.x2 ||
+                 impl_private->lim_x <= real_clip_region->extents.x1 ||
+                 impl_private->llim_y >= real_clip_region->extents.y2 ||
+                 impl_private->lim_y <= real_clip_region->extents.y1)
+               continue;
+             
              draw_rect.x = impl_private->llim_x;
              draw_rect.y = impl_private->llim_y;
              draw_rect.width = impl_private->lim_x - draw_rect.x;
index e6c731d079763622c8425c71c3bb4cb6fe2acc05..8abe98cb56a82036a738f97133726c34266259e7 100644 (file)
@@ -1041,7 +1041,6 @@ gdk_fb_window_move_resize (GdkWindow *window,
        send_expose_events = FALSE;
 
       if (private->mapped && send_expose_events)
-
        old_region = gdk_fb_clip_region (GDK_DRAWABLE_IMPL(window), NULL, TRUE, FALSE, FALSE);
 
       dx = x - private->x;